package app.netant.bt.bthuahua;

import org.jsoup.select.Elements;

import app.netant.NetAntBase;
import app.netant.bt.MargnetDetail;
import app.netant.bt.MargnetEntity;
import app.netant.bt.MargnetPage;
import cn.lily.com.db.DBFactory;
import cn.lily.com.db.container.reader.DataTable;
import cn.lily.com.enviroment.Enviroment;
import cn.lily.com.lang.number.MathUtil;
/**
 * 分页处理
 * @author JiaJ
 *
 */
public class BtHuaHuaPage extends MargnetPage {

	public BtHuaHuaPage(String netSite) {
		super(netSite);
	}
	
	public void analyse(){
		
		Elements activePart = document.select(".wrap .row.list-group li.col-xs-12.list-group-item a");
		for(int i=0;i<activePart.size();i++){
			
			String href = "https://www.bthuahua.net" + activePart.get(i).attr("href");
			
			System.out.println(href+"开始处理");
				
			this.analyseHref(href);

		}
		
	}
	
	@Override
	public MargnetDetail buildDetail(String url) {
		MargnetDetail detail = new BtHuaHuaDetail(url);
		return detail;
	}
	
	public static void main(String[] args) {
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		BtHuaHuaPage page = new BtHuaHuaPage("https://www.bthuahua.net/index.php?r=files%2Findex&kw=18%E7%A6%81%E3%82%B2%E3%83%BC%E3%83%A0&page=41");
		page.analyse();
	}



}
